package io.github.talelin.latticy.service.oms.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.github.talelin.latticy.mapper.oms.OrderItemMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.github.talelin.latticy.model.oms.OrderItemDO;
import io.github.talelin.latticy.service.oms.OrderItemService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-06-28
 */
@Service
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItemDO> implements OrderItemService {

    @Override
    public List<OrderItemDO> getListByOrderNo(Long orderNo) {
        QueryWrapper<OrderItemDO> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(OrderItemDO::getOrderNo,orderNo);
        return this.list(wrapper);
    }

    @Override
    public int deleteByOrderNo(Long orderNo) {
        return this.baseMapper.deleteByOrderNo(orderNo);
    }


}
